package com.ruicar.afs.cloud.channel.register.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruicar.afs.cloud.channel.register.condition.ChannelListingCarRelTempCondition;
import com.ruicar.afs.cloud.channel.register.entity.ChannelListingCarTemp;
import com.ruicar.afs.cloud.channel.register.vo.ChannelListingCarTempVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ChannelListingCarTempMapper extends BaseMapper<ChannelListingCarTemp> {

    List<ChannelListingCarTempVo> getById(@Param("id") Long id);

    IPage<List<ChannelListingCarTempVo>> getApplyListingCarTemp(Page page, @Param("query") ChannelListingCarRelTempCondition query);

    List<ChannelListingCarTempVo> getCarByVin(@Param("channelId") Long channelId, @Param("vin") String vin);

    IPage<List<ChannelListingCarTempVo>> getRegister(Page page, @Param("query") ChannelListingCarRelTempCondition query, @Param("roles") List<String> roles, @Param("key") String key);

    List<Long> getRegisterIds(@Param("userName") String userName, @Param("key") String key);

    IPage<List<ChannelListingCarTempVo>> getNewChannelListingCarTemp(Page page, @Param("query") ChannelListingCarRelTempCondition query, @Param("ids") List<Long> ids);


}
